//
//  ThumbView.m
//  NaRiLSVMT
//
//  Created by jmsre on 14-8-15.
//  Copyright (c) 2014年 helloyouth.org. All rights reserved.
//

#import "ThumbView.h"

extern NSInteger   lastSelectedButtonID;//已经选择了的按钮ID
BOOL    IsPopTwice = NO;//是否需要pop两次.

NSInteger   isCanJumptoDetailUI = 0;//禁止快速点击流程进入节点界面

@implementation ThumbView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

-(void)awakeFromNib
{
    [super awakeFromNib];
    self.flowPlayShadow.hidden = YES;
   // setViewCorner(self,6.0);
    setViewCorner(self.flowPlayShadow,6.0);
    setViewCorner(self.thumbInView,6.0);
}

- (IBAction)jumpToflowUI:(id)sender {
    IsPopTwice = YES;

    if(isCanJumptoDetailUI == 2)
    {
        return;
    }
    else
    {
        isCanJumptoDetailUI = 2;//加锁：不允许点击进入节点界面或者点击流程界面其他按钮
    }
    [self.delegateThumbView HandleFlowControlThumbDetailAction:self ButtonAction:sender];
}

- (IBAction)oncePlayAction:(id)sender {
    
    if (isCanJumptoDetailUI == 2)
    {
        return;
    }
    
    [self.delegateThumbView HandleFlowControlThumbDetailAction:self ButtonAction:sender];
}

- (IBAction)cyclesPlayAction:(id)sender {

    if (isCanJumptoDetailUI == 2)
    {
        return;
    }
    
    [self.delegateThumbView HandleFlowControlThumbDetailAction:self ButtonAction:sender];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/
@end
